﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpMUD.Framework.Services.Security
{
    public sealed class ValidatePasswordEventArgs : System.EventArgs
    {
        private bool _IsNewUser;
        private string _UserName, _Password;

        private ValidatePasswordEventArgs() { }
        public ValidatePasswordEventArgs(string userName, string password, bool isNewUser)
        {
            this._UserName = userName;
            this._Password = password;
            this._IsNewUser = isNewUser;
        }

        /// <summary>
        /// Gets or sets a value that indicates whether the current create-user, change-password, or reset-password action will be canceled.
        /// </summary>
        public bool Cancel { get; set; }

        public System.Exception FailureInformation { get; set; }

        public bool IsNewUser
        { get { return _IsNewUser; } }

        public string Password
        { get { return _Password; } }

        public string UserName
        { get { return _UserName; } }
    }

    public delegate void UserValidatePasswordEventHandler(object sender, ValidatePasswordEventArgs e);
}
